package pseudoAssemblerCompiler.twopassassembler.model.symbolnametable;

import pseudoAssemblerCompiler.twopassassembler.model.assemblerAlgorithms.IViewModel;

import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Set;

/**
 * Created with IntelliJ IDEA.
 * User: Администратор
 * Date: 15.04.12
 * Time: 12:11
 * To change this template use File | Settings | File Templates.
 */
public class SymbolicNamesTableImpl implements IViewModel, ISymbolicNamesTableModel {

    /**
     * Список команд операций
     */
    private Map<String, String> _symbolNameMap = new LinkedHashMap<String, String>();

    public SymbolicNamesTableImpl() {
        _symbolNameMap = new LinkedHashMap<String, String>();
    }

//    @Override
//    public void firstPass(String s) {
//        //To change body of implemented methods use File | Settings | File Templates.
//    }

    @Override
    public Map<String, String> getSymbolNames() {
        return _symbolNameMap;
    }

    @Override
    public Set<String> getKeys() {
        return getSymbolNames().keySet();
    }

    @Override
    public void reset() {
        _symbolNameMap = new LinkedHashMap<String, String>();
    }

}
